/*
 * @Author: huangrongji
 * @Date: 2020-12-12 22:08:04
 * @LastEditors: huangrongji
 * @LastEditTime: 2021-02-01 22:55:57
 * @Description: file content
 * @FilePath: \news_testd:\工作空间\workspace\repair\utils\index.js
 */
// 获取当前路由url/参数
const getCurrentPageUrlWithArgs = () => {
	const pages = getCurrentPages();
	const currentPage = pages[pages.length - 1];
	const url = currentPage.route;
	const options = currentPage.options;
	let urlWithArgs = `/${url}?`;
	for (let key in options) {
		const value = options[key];
		urlWithArgs += `${key}=${value}&`;
	}
	urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1);
	return options;
};

export { getCurrentPageUrlWithArgs };
